<template lang="pug">
  component(ref="component", :value="value", :is="component")
</template>

<script>
export default {
  name: 'dialogComponent',
  props: ['value', 'component'],
  methods: {
    validate() {
      if (this.$refs.component.validate) {
        return this.$refs.component.validate()
      } else {
        return Promise.resolve()
      }
    }
  }
}
</script>

<style scoped lang="scss">

</style>
